<?php
require_once('mysql_connect.php');
if (!isset($_SESSION['userid'])){
	header("Location:login.php");
	exit();
}

$loc ="checkedout";


$query = "SELECT * FROM checkout WHERE usersid=" . $_SESSION['userid'];
$result = mysql_query($query) or die(mysql_error());


include('top.php');
?>
<TABLE><TR><TD>
<?php
if(mysql_num_rows($result) > 0){
echo "<FONT FACE=\"Verdana\" size=\"2\">Please return the following movies:</FONT>";

?>	
<?php
	while($actorrow = mysql_fetch_array($result)){
	echo showmovie($actorrow['movieid']);	
	}
	?>
<?php
}else{
echo "<FONT FACE=\"Verdana\" size=\"2\">You have no movies checked out!</FONT>";
}

?>


</TD></TR></TABLE>
<?php
include('bot.php');
?>